
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="ltr" lang="zh_cn" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="ltr" lang="zh_cn" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="ltr" lang="zh_cn">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>用户注册</title>
<!-- <base href="../mobile/index.html" /> -->

<!-- Facebook share -->
<meta property="og:site_name" content="PHP 开源电商系统 - 成都光大网络科技" />
<meta property="og:url" content="../mobile/account/register" />
<meta property="og:type" content="website" />
<meta property="og:title" content="用户注册" />
<meta property="og:description" content="" />
<meta property="og:image" content="../image/logo-600x315.png" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="315" />

<link href="../javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.css" type="text/css" rel="stylesheet" media="screen" />
<script src="../javascript/app.js?v=c276af9139" type="text/javascript"></script>
<script src="../javascript/jquery/datetimepicker/moment/moment.min.js" type="text/javascript"></script>
<script src="../javascript/jquery/datetimepicker/moment/moment-with-locales.min.js" type="text/javascript"></script>
<script src="../javascript/jquery/datetimepicker/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<link href="../image/favicon.png" rel="icon" />
<link href="../theme/mobile/stylesheet/stylesheet.css?v=7000b9778f" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../src/DebugBar/Resources/vendor/highlightjs/styles/github.css">
<link rel="stylesheet" type="text/css" href="../src/DebugBar/Resources/debugbar.css">
<link rel="stylesheet" type="text/css" href="../src/DebugBar/Resources/widgets.css">
<link rel="stylesheet" type="text/css" href="../src/DebugBar/Resources/openhandler.css">
<link rel="stylesheet" type="text/css" href="../src/DebugBar/Resources/widgets/sqlqueries/widget.css">
<script type="text/javascript" src="../src/DebugBar/Resources/vendor/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="../src/DebugBar/Resources/vendor/highlightjs/highlight.pack.js"></script>
<script type="text/javascript" src="../src/DebugBar/Resources/debugbar.js"></script>
<script type="text/javascript" src="../src/DebugBar/Resources/widgets.js"></script>
<script type="text/javascript" src="../src/DebugBar/Resources/openhandler.js"></script>
<script type="text/javascript" src="../src/DebugBar/Resources/widgets/sqlqueries/widget.js"></script>
<script type="text/javascript">jQuery.noConflict(true);</script>

</head>
<body class="account-register" ontouchstart="" onmouseover="">

  <div class="assist-side">
        <a class="btn-meiqia"><i class="iconfont">&#xe607;</i></a>
    <script type='text/javascript'>
      (function(m, ei, q, i, a, j, s) {
        m[i] = m[i] || function() {
          (m[i].a = m[i].a || []).push(arguments)
        };
        j = ei.createElement(q),
          s = ei.getElementsByTagName(q)[0];
        j.async = true;
        j.charset = 'UTF-8';
        j.src = 'https://static.meiqia.com/dist/meiqia.js?_=t';
        s.parentNode.insertBefore(j, s);
      })(window, document, 'script', '_MEIQIA');
      _MEIQIA('entId', '116919');
      _MEIQIA('language', 'zh');
      _MEIQIA('manualInit'); // 在这里开启手动模式
      _MEIQIA('withoutBtn'); // 不显示默认按钮
      _MEIQIA('init');

      $(document).on('click', '.btn-meiqia', function(event) {
        _MEIQIA('showPanel');
      });
    </script>
            <a href="../mobile/index.html"><i class="iconfont">&#xe629;</i></a>
        <a href="#page-top" class="go-top"><i class="iconfont">&#xe6fe;</i></a>
  </div>

<div class="container">
  <div class="row">
    <div id="content" class="col-sm-12">
      <div class="nav-bar">用户注册</div>
            <div class="row widget">
        <div class="col-xs-12">
          <ul class="nav nav-tabs">
            <li id="tab-mobile" class="active"><a href="#tab-general" data-toggle="tab">手机注册</a></li>
            <li id="tab-email" ><a href="#tab-general" data-toggle="tab">邮箱注册</a></li>
          </ul>
          <div class="tab-content mt-2">
            <div class="tab-pane active" id="tab-register-email">
              <form action="../mobile/account/register" method="post" enctype="multipart/form-data" class="form-horizontal form-group-list">
                <fieldset id="account">
                  <div class="form-group required" style="display:  none ;">
                    <label class="col-sm-2 control-label">客户群组</label>
                    <div class="col-sm-10">                                            <div class="radio">
                        <label>
                          <input type="radio" name="customer_group_id" value="1" checked="checked" />
                          普通用户组
                        </label>
                      </div>
                                                                </div>
                  </div>

                  <div class="form-group required hidden">
                    <label class="col-sm-2 control-label" for="input-firstname">姓名</label>
                    <div class="col-sm-10">
                      <input type="text" name="firstname" value="" placeholder="姓名" id="input-firstname" class="form-control" />
                                          </div>
                  </div>
                  <div class="form-group required hidden">
                    <label class="col-sm-2 control-label" for="input-lastname">姓氏</label>
                    <div class="col-sm-10">
                      <input type="text" name="lastname" value="" placeholder="姓氏" id="input-lastname" class="form-control" />
                                          </div>
                  </div>

                  <div class="form-group hidden">
                      <input type="text" name="type" value="mobile" class="form-control" />
                  </div>

                  <div class="form-group required hidden">
                    <label class="col-sm-2 control-label" for="input-email">电子邮箱</label>
                    <div class="col-sm-10">
                      <input type="email" name="email" value="" placeholder="电子邮箱" id="input-email" class="form-control" />
                                          </div>
                  </div>

                  <div class="captcha-wrapper mobile">
                                        <div class="form-group required ">

                    </div>
                                      </div>
                  <div class="form-group required ">
                    <label class="col-sm-2 control-label" for="input-telephone">联系电话</label>
                    <div class="col-sm-10">
                                            <div class="row">
                        <div class="col-xs-8">
                            <input type="hidden" name="calling_code" value="86">
  <input name="telephone" value="" placeholder="联系电话" id="input-telephone"
         class="form-control"/>

                        </div>
                        <div class="col-xs-4">
                          <input id="button-verify" type="button" class="button button-code btn btn-info btn-block" value="获取验证码" onClick="get(this)" />
                        </div>
                      </div>
                                                                </div>
                  </div>

                                    <div class="form-group required ">
                    <label class="col-sm-2 control-label hidden-xs" for="input-smscode">验证码</label>
                    <div class="col-sm-10">
                      <input type="text" name="smscode" value="" placeholder="验证码" id="input-smscode" class="form-control" />
                                          </div>
                  </div>

                                    <div class="form-group required">
                    <label class="col-sm-2 control-label" for="input-password">输入密码</label>
                    <div class="col-sm-10">
                      <input type="password" name="password" value="" placeholder="输入密码" id="input-password" class="form-control" />
                                          </div>
                  </div>
                  <div class="form-group required">
                    <label class="col-sm-2 control-label" for="input-confirm">确认密码</label>
                    <div class="col-sm-10">
                      <input type="password" name="confirm" value="" placeholder="确认密码" id="input-confirm" class="form-control" />
                                          </div>
                  </div>
                  <div class="form-group">
                    <label class="col-sm-2 control-label" style="display:block;margin-bottom: 0;">订阅邮件</label>
                    <div class="col-sm-10">                       <label class="radio-inline">
                        <input type="radio" name="newsletter" value="1" />
                        是
                      </label>
                      <label class="radio-inline">
                        <input type="radio" name="newsletter" value="0" checked="checked" />
                        否
                      </label>
                                          </div>
                  </div>
                                <div class="form-group">
                  <div class="col-sm-10">
                                        <input type="checkbox" name="agree" value="1" />
                                        我已阅读并同意 <a href="../mobile/index.htmlindex.php?route=information/information/agree&amp;information_id=3" class="agree"> <b>隐私政策</b></a>
                  </div>
                </div>
                                <div class="captcha-wrapper email">
                                  </div>
                <input type="submit" value="继续" class="btn btn-primary btn-block mt-1" />
              </form>
            </div>
          </div>
        </div>
      </div>
      <div class="row widget">
        <div class="col-xs-12">
            <div class="omni-auth-wrapper">
              <p><span>其他登录方式</span></p>
              <div class="icons">
                <a onclick="window.open('index.php?route=account/social/redirect&provider=facebook', 'newwindow', 'width=700,height=450,top=200,left=600,menubar=0, scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1'); return false;" href="javascript:void(0);">
                  <i class="fa fa-facebook" aria-hidden="true"></i>
                </a>
                <a onclick="window.open('index.php?route=account/social/redirect&provider=wechat', 'newwindow', 'width=700,height=450,top=200,left=600,menubar=0, scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1'); return false;" href="javascript:void(0);">
                  <i class="fa fa-wechat" aria-hidden="true"></i>
                </a>
                <a onclick="window.open('index.php?route=account/social/redirect&provider=qq', 'newwindow', 'width=700,height=450,top=200,left=600,menubar=0, scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1'); return false;" href="javascript:void(0);">
                  <i class="fa fa-qq" aria-hidden="true"></i>
                </a>
                <a onclick="window.open('index.php?route=account/social/redirect&provider=weibo', 'newwindow', 'width=700,height=450,top=200,left=600,menubar=0, scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1'); return false;" href="javascript:void(0);">
                  <i class="fa fa-weibo" aria-hidden="true"></i>
                </a>
              </div>
            </div>
        </div>
      </div>
      </div>
    </div>
</div>
<script type="text/javascript"><!--
// Sort the custom fields
$('#account .form-group[data-sort]').detach().each(function() {
  if ($(this).attr('data-sort') >= 0 && $(this).attr('data-sort') <= $('#account .form-group').length) {
    $('#account .form-group').eq($(this).attr('data-sort')).before(this);
  }

  if ($(this).attr('data-sort') > $('#account .form-group').length) {
    $('#account .form-group:last').after(this);
  }

  if ($(this).attr('data-sort') == $('#account .form-group').length) {
    $('#account .form-group:last').after(this);
  }

  if ($(this).attr('data-sort') < -$('#account .form-group').length) {
    $('#account .form-group:first').before(this);
  }
});

$('input[name=\'customer_group_id\']').on('change', function() {
  $.ajax({
    url: 'index.php?route=account/register/customfield&customer_group_id=' + this.value,
    dataType: 'json',
    success: function(json) {
      $('.custom-field').hide();
      $('.custom-field').removeClass('required');

      for (i = 0; i < json.length; i++) {
        custom_field = json[i];

        $('#custom-field' + custom_field['custom_field_id']).show();

        if (custom_field['required']) {
          $('#custom-field' + custom_field['custom_field_id']).addClass('required');
        }
      }
    },
    error: function(xhr, ajaxOptions, thrownError) {
      alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
    }
  });
});

setTimeout(function () {
  $('input[name=\'customer_group_id\']:checked').trigger('change');
}, 500);
//--></script>
<script type="text/javascript"><!--
$('button[id^=\'button-custom-field\']').on('click', function() {
  var element = this;

  $('#form-upload').remove();

  $('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');

  $('#form-upload input[name=\'file\']').trigger('click');

  if (typeof timer != 'undefined') {
      clearInterval(timer);
  }

  timer = setInterval(function() {
    if ($('#form-upload input[name=\'file\']').val() != '') {
      clearInterval(timer);

      $.ajax({
        url: 'index.php?route=tool/upload',
        type: 'post',
        dataType: 'json',
        data: new FormData($('#form-upload')[0]),
        cache: false,
        contentType: false,
        processData: false,
        beforeSend: function() {
          $(element).button('loading');
        },
        complete: function() {
          $(element).button('reset');
        },
        success: function(json) {
          $(element).parent().find('.text-danger').remove();

          if (json['error']) {
            $(element).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
          }

          if (json['success']) {
            alert(json['success']);

            $(element).parent().find('input').val(json['code']);
          }
        },
        error: function(xhr, ajaxOptions, thrownError) {
          alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
        }
      });
    }
  }, 500);
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
  language: 'en-gb',
  pickTime: false
});

$('.time').datetimepicker({
  language: 'en-gb',
  pickDate: false
});

$('.datetime').datetimepicker({
  language: 'en-gb',
  pickDate: true,
  pickTime: true
});
//--></script>
<script type="text/javascript"><!--
var timeconst = 2 * 60;
var maxtime = timeconst;
function countDown() {
  if(maxtime >= 0) {
    msg = maxtime + " 秒重试";
    $('#button-verify').val(msg);
    --maxtime;
  } else {
    clearInterval(timer);
    maxtime = timeconst;
    $('#button-verify').val("重新获取验证码");
    $('#button-verify').attr("disabled",false);
  }
}

function get(obj) {
    var partten = /^\d{10,13}$/;
  if (!partten.test(document.getElementById("input-telephone").value)) {
    layer.msg('请输入正确格式的手机号码');
    return;
  }
    var calling_code = $('input[name="calling_code"]').val();
  if (calling_code === undefined) {
    calling_code = $('select[name="calling_code"]').val();
  }
  $.ajax({
    url: 'index.php?route=account/register/verify',
    type: "POST",
    data: "calling_code=" + calling_code + "&telephone=" + $("#input-telephone").val() + "&captcha=" + $("#input-captcha").val(),
    dataType: 'json',
    success: function(data) {
      if(data['error']) {
        layer.msg(data['error']);
      } else if (data['status'] == "fail") {
        layer.msg(data['msg']);
      } else if (data['status'] == "success") {
        obj.disabled = true;
        timer = setInterval("countDown()",1000);
      }
    }
  })
}
//--></script>
<script type="text/javascript"><!--
  $('#tab-email').on('click', function () {
    $('.captcha-wrapper.email').append($('.captcha-wrapper.mobile').html());
    $('.captcha-wrapper.mobile').html('');
    $('input[name=\'email\']').parents('.form-group').removeClass('hidden');
    $('input[name=\'telephone\']').parents('.form-group').addClass('hidden');
    $('input[name=\'smscode\']').parents('.form-group').addClass('hidden');
    $('input[name=\'telephone\']').val('');
    $('input[name=\'type\']').val('email');
  });
  $('#tab-mobile').on('click', function () {
    $('.captcha-wrapper.mobile').append($('.captcha-wrapper.email').html());
    $('.captcha-wrapper.email').html('');
    $('input[name=\'telephone\']').parents('.form-group').removeClass('hidden');
    $('input[name=\'smscode\']').parents('.form-group').removeClass('hidden');
    $('input[name=\'email\']').parents('.form-group').addClass('hidden');
    $('input[name=\'email\']').val('');
    $('input[name=\'type\']').val('mobile');
  });
  //--></script>
  <footer>
        <div class="language-currency-wrapper mb-1 mt-1">
            <a href="#" id="switch-language">
    <img src="../image/language/zh-cn.png" alt="简体中文" title="简体中文">
    简体中文
  </a>

  <script type="text/javascript">
  $('#switch-language').click(function (e) {
    e.preventDefault();
    layer.open({
      type: 1,
      title: '语言',
      closeBtn: 1,
      anim: 2,
      shadeClose: true,
      scrollbar: false,
      area: ['80%'],
      content: language_modal_content()
    });
  });

  function language_modal_content() {
    var html = '<div class="m-2">';
        html += '<a href="../mobile/account/register?language=zh-cn" class="list-group-item"><img src="../image/language/zh-cn.png"/> 简体中文</a>';
        html += '<a href="../mobile/account/register?language=en-gb" class="list-group-item"><img src="../image/language/en-gb.png"/> English</a>';
        html += '<a href="../mobile/account/register?language=zh-hk" class="list-group-item"><img src="../image/language/zh-hk.png"/> 繁體中文</a>';
        html += '</div>';
    return html;
  }
  </script>

                      <a href="#" id="switch-currency">
      ￥  人民币
    </a>

  <script type="text/javascript">
  $('#switch-currency').click(function (e) {
    e.preventDefault();
    layer.open({
      type: 1,
      title: '货币',
      closeBtn: 1,
      anim: 2,
      shadeClose: true,
      scrollbar: false,
      area: ['80%'],
      content: currency_modal_content()
    });
  });

  function currency_modal_content() {
    var html = '<div class="m-2">';
        html += '<a href="../mobile/account/register?currency=USD" class="list-group-item">$ US Dollar</a>';
        html += '<a href="../mobile/account/register?currency=CNY" class="list-group-item">￥ 人民币</a>';
        html += '<a href="../mobile/account/register?currency=JPY" class="list-group-item">¥ 日元 </a>';
        html += '</div>';
    return html;
  }
  </script>

    </div>
        <div class="container">
      <div class="footer-powered">
        技术支持
      </div>
    </div>
  </footer>
      <nav id="bottom-tab-menu">
      <div class="menu-item">
        <a class="" href="../mobile/index.html">
          <i class="iconfont">&#xe669;</i>
          <div class="name">首页</div>
        </a>
      </div>
      <div class="menu-item">
        <a class="" href="../mobile/search.html">
          <i class="iconfont">&#xe602;</i>
          <div class="name">搜索</div>
        </a>
      </div>
      <div class="menu-item">
        <a class="" href="../mobile/categories.html">
          <i class="iconfont">&#xe61d;</i>
          <div class="name">分类</div>
        </a>
      </div>
      <div class="menu-item cart">
        <a class="" href="../mobile/cart.html">
          <i class="iconfont"><span class="cart-total" style=""></span>&#xe660;</i>
          <div class="name">购物车</div>
        </a>
      </div>
      <div class="menu-item">
        <a class="active" href="../mobile/account.html">
          <i class="iconfont">&#xe640;</i>
          <div class="name">会员中心</div>
        </a>
      </div>
    </nav>

</body>
</html>
